package com.rybbaby.tss.front.tssPackage.entity;

import com.rybbaby.tss.platform.sysAdminUser.entity.SysAdminUser;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @description 课时包表
 * 
 * @author 雷春琼
 * 
 * @createDate 2017-08-10 上午12:08:51
 */
@Entity
@Table(name = "tss_package")
@DynamicUpdate(true)
@DynamicInsert(true)
public class TssPackage implements Serializable {
	
	private static final long serialVersionUID = 54278994904928L;
	
	/** 主键 **/
	private String id;
	/** 课时包名称 **/
	private String name;
	/** 亲子总课时数 **/
	private Integer totalClassHour;
	/** 课时包总价 **/
	private Double sumPrice;
	/** 课时包原单价 **/
	private Double originalUnitPrice;
	/** 过渡可出勤天数 **/
	private Integer attendanceDay;
	/** 有效期 **/
	private Integer validDate;
	/** 当前操作者Id **/
	private String adminUserId;
	/** 创建时间 **/
	private java.sql.Timestamp createTime;
	/** 赠课范围 **/
	private java.sql.Timestamp updateTime;
	/** 版本 **/
	private Integer version;

	/** 版本 **/
	private Integer type;

	/**
	 * 是否停用
	 */
	private Boolean isBlockUp;

	/** 员工信息 **/
	private SysAdminUser sysAdminUser;
	
	/**
	 * 方法: 取得主键
	 *
	 * @return java.lang.String 主键
	 */
	@Id
	@GeneratedValue(generator = "tss_packageIDGenerator" , strategy = GenerationType.AUTO)
	@GenericGenerator(name = "tss_packageIDGenerator" , strategy = "uuid")
	@Column(name = "id", nullable= false, length = 32)
	public String getId() {
		return this.id;
	}
	
	/**
	 * 方法: 设置主键
	 *
	 * @param id 主键
	 */
	public void setId(String id) {
		this.id = id;
	}
	
	/**
	 * 方法: 取得课时包名称
	 *
	 * @return java.lang.Integer 课时包名称
	 */
	@Column(name = "name", nullable= true, length = 32)
	public String getName() {
		return this.name;
	}
	
	/**
	 * 方法: 设置课时包名称
	 *
	 * @param name 课时包名称
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * 方法: 取得亲子总课时数
	 *
	 * @return java.lang.Integer 亲子总课时数
	 */
	@Column(name = "totalClassHour", nullable= true, length = 11)
	public Integer getTotalClassHour() {
		return this.totalClassHour;
	}
	
	/**
	 * 方法: 设置亲子总课时数
	 *
	 * @param totalClassHour 亲子总课时数
	 */
	public void setTotalClassHour(Integer totalClassHour) {
		this.totalClassHour = totalClassHour;
	}
	
	/**
	 * 方法: 取得课时包总价
	 *
	 * @return java.lang.Double 课时包总价
	 */
	@Column(name = "sumPrice", nullable= true, length = 22)
	public Double getSumPrice() {
		return this.sumPrice;
	}
	
	/**
	 * 方法: 设置课时包总价
	 *
	 * @param sumPrice 课时包总价
	 */
	public void setSumPrice(Double sumPrice) {
		this.sumPrice = sumPrice;
	}
	
	/**
	 * 方法: 取得课时包原单价
	 *
	 * @return java.lang.Double 课时包原单价
	 */
	@Column(name = "originalUnitPrice", nullable= true, length = 22)
	public Double getOriginalUnitPrice() {
		return this.originalUnitPrice;
	}
	
	/**
	 * 方法: 设置课时包原单价
	 *
	 * @param originalUnitPrice 课时包原单价
	 */
	public void setOriginalUnitPrice(Double originalUnitPrice) {
		this.originalUnitPrice = originalUnitPrice;
	}
	
	/**
	 * 方法: 取得过渡可出勤天数
	 *
	 * @return java.lang.Integer 过渡可出勤天数
	 */
	@Column(name = "attendanceDay", nullable= true, length = 11)
	public Integer getAttendanceDay() {
		return this.attendanceDay;
	}
	
	/**
	 * 方法: 设置过渡可出勤天数
	 *
	 * @param attendanceDay 过渡可出勤天数
	 */
	public void setAttendanceDay(Integer attendanceDay) {
		this.attendanceDay = attendanceDay;
	}
	
	/**
	 * 方法: 取得有效期
	 *
	 * @return java.lang.Integer 有效期
	 */
	@Column(name = "validDate", nullable= true, length = 11)
	public Integer getValidDate() {
		return this.validDate;
	}
	
	/**
	 * 方法: 设置有效期
	 *
	 * @param validDate 有效期
	 */
	public void setValidDate(Integer validDate) {
		this.validDate = validDate;
	}
	
	/**
	 * 方法: 取得当前操作者Id
	 *
	 * @return java.lang.String 当前操作者Id
	 */
	@Column(name = "adminUserId", nullable= true, length = 32)
	public String getAdminUserId() {
		return this.adminUserId;
	}
	
	/**
	 * 方法: 设置当前操作者Id
	 *
	 * @param adminUserId 当前操作者Id
	 */
	public void setAdminUserId(String adminUserId) {
		this.adminUserId = adminUserId;
	}

	/**
	 * 方法: 取得创建时间
	 *
	 * @return java.sql.Timestamp 创建时间
	 */
	@Column(name = "createTime", nullable= true, length = 19)
	public java.sql.Timestamp getCreateTime() {
		return this.createTime;
	}
	
	/**
	 * 方法: 设置创建时间
	 *
	 * @param createTime 创建时间
	 */
	public void setCreateTime(java.sql.Timestamp createTime) {
		this.createTime = createTime;
	}
	
	/**
	 * 方法: 取得赠课范围
	 *
	 * @return java.sql.Timestamp 赠课范围
	 */
	@Column(name = "updateTime", nullable= true, length = 19)
	public java.sql.Timestamp getUpdateTime() {
		return this.updateTime;
	}
	
	/**
	 * 方法: 设置赠课范围
	 *
	 * @param updateTime 赠课范围
	 */
	public void setUpdateTime(java.sql.Timestamp updateTime) {
		this.updateTime = updateTime;
	}
	
	/**
	 * 方法: 取得版本
	 *
	 * @return java.lang.Integer 版本
	 */
    @Version
	@Column(name = "version", nullable= true, length = 11)
	public Integer getVersion() {
		return this.version;
	}
	
	/**
	 * 方法: 设置版本
	 *
	 * @param version 版本
	 */
	public void setVersion(Integer version) {
		this.version = version;
	}

	@Column(name = "isBlockUp", nullable= true, length = 1)
	public Boolean getIsBlockUp() {
		return this.isBlockUp;
	}

	public void setIsBlockUp(Boolean isBlockUp) {

		this.isBlockUp = isBlockUp;
	}
	@Column(name = "type", nullable= true, length = 11)
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@JoinColumn(name = "adminUserId" , insertable = false , updatable = false)
	@ManyToOne(fetch = FetchType.LAZY , targetEntity = SysAdminUser.class)
	public SysAdminUser getSysAdminUser() {
		return sysAdminUser;
	}

	public void setSysAdminUser(SysAdminUser sysAdminUser) {
		this.sysAdminUser = sysAdminUser;
	}
}